package com.hxp.birthday;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.widget.TextView;

public class FiveFragment extends Fragment{
	private TextView text_five;
	@Override
	public View onCreateView(LayoutInflater inflater,
			@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
		View five=inflater.inflate(R.layout.five, null);
		text_five=(TextView) five.findViewById(R.id.text_five);
		DisplayMetrics dm2 = getResources().getDisplayMetrics();

		int width = (dm2.widthPixels) / 2;
		int height = (dm2.heightPixels) / 2;
		Animation translateAnimation = new TranslateAnimation(width/2, 0f,height/2,0f);
		translateAnimation.setDuration(2000);
		
		text_five.startAnimation(translateAnimation);
		
		
		
		return five;
	}

}
